package Test11_08;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.*;

public class People  {
    //员工有姓名，年龄，性别，职务，薪水、工号等属性
    private String name;
    private int age;
    private String sex;
    private String work;
    private int money;
    private String  id;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public People(String name, int age, String sex, String work, int money, String id) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.work = work;
        this.money = money;
        this.id = id;
    }    @Override
    public String toString() {
        return "People{" +
                "姓名='" + name + '\'' +
                ", 年龄='" + age + '\'' +
                ", 性别='" + sex + '\'' +
                ", 工作='" + work + '\'' +
                ", 薪水='" + money + '\'' +
                ", 工号=" + id +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        People people = (People) o;
        return Objects.equals(id, people.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
















}
